feat(dev-helper): add warning for invalid .diff() usage without comparison date#2948
Merged
iamkun merged 1 commit intoiamkun:devfrom Oct 27, 2025
Merged
Conversation
Owner
|
Looks cool. THX |
github-actions bot
pushed a commit
that referenced
this pull request
Oct 31, 2025
## [1.11.19](v1.11.18...v1.11.19) (2025-10-31) ### Bug Fixes * added usage warnings for diff + updated unit tests ([#2948](#2948)) ([269a7a9](269a7a9)) * dont instantiate regexes within ar locale functions to avoid performance overhead ([#2898](#2898)) ([af5e9f0](af5e9f0)) * replace italian locale "un' ora fa" with "un'ora fa", add tests for it ([#2930](#2930)) ([9e9f76c](9e9f76c)) * Updated Belarusian locale with relative time ([#2656](#2656)) ([1d8746c](1d8746c))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR enhances the dev-helper plugin by adding a developer warning when .diff() is called without a valid comparison date.
Added unit tests to cover:
Missing comparison date
Invalid (unparsable) string
Valid date strings and Day.js instances (no warning)
Thanks for the earlier feedback in #2945 — this implementation follows the agreed approach to keep behavior consistent with Moment.js while improving developer guidance through dev-helper.